import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/components/Home/Home'
import Abnormalvideo from '@/components/Home/Abnormalvideo/Abnormalvideo'
import Abnormalvideofloor from '@/components/Home/Abnormalvideo/Abnormalvideofloor'
import energy from '@/components/Home/energy/energy'
import energyfloor from '@/components/Home/energy/energyfloor'
import operation from '@/components/Home/operation/operation'
import operationfloor from '@/components/Home/operation/operationfloor'
import workorder from '@/components/Home/workorder/workorder'
import workorderfloor from '@/components/Home/workorder/workorderfloor'
import property from '@/components/Home/property/property'
import propertyfloor from '@/components/Home/property/propertyfloor'
import appmain from '@/components/Home/appmain/appmain'
import appmainfloor from '@/components/Home/appmain/appmainfloor'

import HomeEquip from '@/components/Home/HomeEquip'
import appmainEquip from '@/components/Home/appmain/appmainEquip'
import Aircondition from '@/components/Home/Airconditioner/Airconditioner'
import airfloor from '@/components/Home/Airconditioner/airfloor'
import Airzoom from '@/components/Home/Airconditioner/airzoom'
import lighting from '@/components/Home/lighting/lighting'
import lightlingFl from '@/components/Home/lighting/lightlingfloor'
import Watersystem from '@/components/Home/Watersystem/Watersystem'
import WaterFloor from '@/components/Home/Watersystem/waterfloor'
import Video from '@/components/Home/video/video'
import VideoFloor from '@/components/Home/video/videofloor'
import Electric from '@/components/Home/electric/electric'
import ElectircFloor from '@/components/Home/electric/electircfloor'
import Elevator from '@/components/Home/Elevator/Elevator'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect: '/home'
    },
    {
      path: '/home',
      name: 'Home',
      component: Home,
      children: [
        {path: 'appmain',name: 'appmain',component: appmain},
        {path: 'appmainfloor',name: 'appmainfloor',component: appmainfloor},
        {path: 'Abnormalvideo',name: 'Abnormalvideo',component: Abnormalvideo},
        {path: 'Abnormalvideofloor',name: 'Abnormalvideofloor',component: Abnormalvideofloor},
        {path: 'energy',name: 'energy',component: energy},
        {path: 'energyfloor',name: 'energyfloor',component: energyfloor},
        {path: 'operation',name: 'operation',component: operation},
        {path: 'operationfloor',name: 'operationfloor',component: operationfloor},
        {path: 'property',name: 'property',component: property},
        {path: 'propertyfloor',name: 'propertyfloor',component: propertyfloor},
        {path: 'workorder',name: 'workorder',component: workorder},
        {path: 'workorderfloor',name: 'workorderfloor',component: workorderfloor}
      ],
      redirect: '/home/appmain'
    },
    {
      path: '/homeEquip',
      name: 'HomeEquip',
      component: HomeEquip,
      children: [
        {path: 'appmainEquip',name: 'appmainEquip',component: appmainEquip},
        {path: 'Airconditioner',name: 'aircondition',component: Aircondition},
        {path: 'airfloor',name: 'airfloor',component: airfloor},
        {path: 'airzoom',name: 'airzoom',component: Airzoom},
        {path: 'lighting',name: 'lighting',component: lighting},
        {path: 'lightlingfloor',name: 'lightlingfloor',component: lightlingFl},
        {path: 'Watersystem',name: 'watersystem',component: Watersystem},
        {path: 'waterfloor',name: 'waterfloor',component: WaterFloor},
        {path: 'video',name: 'video',component: Video},
        {path: 'videofloor',name: 'videofloor',component: VideoFloor},
        {path: 'electric',name: 'electric',component: Electric},
        {path: 'electircfloor',name: 'electircfloor',component: ElectircFloor},
        {path: 'Elevator',name: 'elevator',component: Elevator}
      ],
      redirect: '/homeEquip/appmainEquip'
    }
  ]
})
